/**
 * 数组去重
 * @param arr
 */
function arrUnique(arr) {
  return Array.from(new Set(arr))
}

/**
 * 分割数组subGroupLength份
 * @param array
 * @param subGroupLength
 */
function groupArray(array, subGroupLength) {
  let index = 0;
  let newArray = [];
  while (index < array.length) {
    newArray.push(array.slice(index, index += subGroupLength));
  }
  return newArray;
}
